﻿using ActivateYourGlutes.Services;
using ActivateYourGlutes.Services.Implementation;
using NUnit.Framework;

namespace ActivateYourGlutes.Model.Tests.Integration.Providers
{
    [TestFixture]
    public class Test_GoalProvider : DatabaseIntegrationTest
    {
        IGoalProvider _goalProvider;

        [SetUp]
        public void SetUp()
        {
            _goalProvider = new GoalProvider(new IntegrationTestEntityModelFactory());
        }

        [Test]
        public void Test_RecentlyAchievedGoals_ReturnsMaximumOfFive()
        {
            Database.ReadXmlSchema(TestResource("MinimalGoalDataSet.xsd"));
            Database.ReadXml(TestResource("GoalData.xml"));

            Database.PerformDbOperation(NDbUnit.Core.DbOperationFlag.CleanInsertIdentity); 
        }
    }
}